import { Module } from 'vuex'

const state = {
  token: '',
  openid: '',
}

export type UserState = typeof state

export const user: Module<UserState, any> = {
  namespaced: true,
  state,
  mutations: {
    SET_TOKEN: (state: UserState, token) => {
      state.token = token
    },
    SET_OPENID: (state: UserState, openid) => {
      state.openid = openid
    },
  },
  actions: {
  },
}
